package com.rds.common.core.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.data.annotation.Id;


import java.util.Date;

//@Document(indexName = "history",type = "oper_history")
public class SysElasticSearch {
    @Id
    private Integer operateId;

    public Long getDocId() {
        return docId;
    }

    public void setDocId(Long docId) {
        this.docId = docId;
    }

    private Long docId;

    //@Field(type= FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String username;

    //@Field(type=FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String operation;

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    //@Field(type=FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String module;

    public String getOperationDetail() {
        return operationDetail;
    }

    public void setOperationDetail(String operationDetail) {
        this.operationDetail = operationDetail;
    }

    //@Field(type=FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String operationDetail;

    //@Field(type=FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date modified;


    public Integer getOperateId() {
        return operateId;
    }

    public void setOperateId(Integer operateId) {
        this.operateId = operateId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public Date getModified() {
        return modified;
    }

    public void setModified(Date modified) {
        this.modified = modified;
    }

    @Override
    public String toString() {
        return "SysElasticSearch{" +
                "operateId=" + operateId +
                ", username='" + username + '\'' +
                ", operation='" + operation + '\'' +
                ", operationDetail='" + operationDetail + '\'' +
                ", module='" + module + '\'' +
                ", modified=" + modified +
                '}';
    }
}
